import React, { Component } from 'react'
import context from './context'
import context1 from './context1'

export default class Son extends Component {
  render() {
    // 这是context接收数据的方式一:
    return (
      <context.Consumer>
        {(data) => {
          // data就是传递过来的数据
          return <div>Son,{data}</div>
        }}
      </context.Consumer>
    )
  }
}
